import Layout from '../views/layout/Layout'

const _import = require('./_import_' + process.env.NODE_ENV)
var AppComponent = {
  template: '<router-view/>'
}
export default {
  path: '/bihuasuan',
  component: Layout,
  name: "bihuasuan",
  meta: { title: "碧划算管理后台", icon: "icon" },
  children: [
    {
      path: '/bihuasuan-order',
      component: AppComponent,
      redirect: "/bihuasuan-order/manage",
      name: "b-order",
      meta: { title: "碧划算订单管理" },
      children: [
        {
          path: "manage",
          component: _import("bihuasuan/order/manage/list"),
          name: "b-orderManage",
          meta: {
            title: "订单管理",
            buttons: {
              sync: { label: '同步', enabled: true },
              predictDetail: { label: '预估佣金明细', enabled: true },
              realDetail: { label: '实发佣金明细', enabled: true }
            }
          }
        },
        {
          path: 'statistics',
          component: _import('bihuasuan/order/statistics/list'),
          name: 'b-orderStatistics',
          meta: { title: '订单统计' }
        }
      ]
    },
    {
      path: '/bihuasuan-goods',
      component: AppComponent,
      redirect: "/bihuasuan-goods/tkmanage",
      name: "b-goods",
      meta: { title: "碧划算商品管理" },
      children: [
        {
          path: "tkmanage",
          component: _import("bihuasuan/goods/taoke/manage"),
          name: "b-goodsTkManage",
          meta: {
            title: "大淘客栏目管理",
            buttons: {
              sync: { label: '同步', enabled: true },
              delete: { label: '删除', enabled: true }
            }
          }
        },
        {
          path: "ddkmanage",
          component: _import("bihuasuan/goods/duoduoke/manage"),
          name: "b-goodsDdkManage",
          meta: {
            title: "多多客类目管理",
            buttons: {
              sync: { label: '同步', enabled: true },
              operate: { label: '上下架', enabled: true }
            }
          }
        },
        {
          path: "platform",
          component: _import("bihuasuan/goods/platform/list"),
          name: "b-goodsPlatform",
          meta: {
            title: "平台管理",
            buttons: {
              operate: { label: '启用/停用', enabled: true }
            }
          }
        },
        {
          path: 'taobaoActivity',
          component: _import('bihuasuan/taobao/list'),
          name: 'b-taobaoActivity',
          meta: {
            title: '淘宝官方活动',
            buttons: {
              add: { label: '新增', enabled: true },
              edit: { label: '编辑', enabled: true }
            }
          }
        },
        {
          path: 'taobaoAdd',
          component: _import('bihuasuan/taobao/edit'),
          name: 'b-taobaoActivityAdd',
          meta: { title: '淘宝官方活动新增', noCache: true },
          hidden: true
        },
        {
          path: 'taobaoEdit/:id',
          name: 'b-taobaoActivityEdit',
          component: _import('bihuasuan/taobao/edit'),
          meta: { title: '淘宝官方活动编辑', noCache: true },
          hidden: true,
          props: true
        }
      ]
    },
    {
      path: '/bihuasuan-ad',
      component: AppComponent,
      redirect: "/bihuasuan-ad/icon",
      name: "b-manage",
      meta: { title: "碧划算广告管理"},
      children: [
        {
          path: "icon",
          component: _import("bihuasuan/ad/icon/list"),
          name: "b-icon",
          meta: {
            title: "首页icon",
            buttons: {
              add: { label: '新建', enabled: true },
              edit: { label: '编辑', enabled: true },
              stop: { label: '下架', enabled: true }
            }
          }
        },
        {
          path: "addIconAd/:type",
          component: _import("bihuasuan/ad/edit/index"),
          name: "b-iconAdd",
          meta: { title: "新建ICON广告", noCache: true },
          hidden: true
        },
        {
          path: "editManageAd/:id/:type",
          component: _import("bihuasuan/ad/edit/index"),
          name: "b-iconEdit",
          meta: { title: "编辑ICON广告", noCache: true },
          hidden: true,
          props: true
        },
        {
          path: "ad",
          component: _import("bihuasuan/ad/manage/list"),
          name: "b-ad",
          meta: {
            title: "广告管理",
            buttons: {
              add: { label: '新建', enabled: true },
              edit: { label: '编辑', enabled: true },
              stop: { label: '下架', enabled: true }
            }
          }
        },
        {
          path: "add/:type",
          component: _import("bihuasuan/ad/edit/index"),
          name: "b-adAdd",
          meta: { title: "广告新增", noCache: true },
          hidden: true
        },
        {
          path: "edit/:id/:type",
          name: "b-adEdit",
          component: _import("bihuasuan/ad/edit/index"),
          meta: { title: "广告编辑", noCache: true },
          hidden: true,
          props: true
        }, {
          path: 'middleAd',
          component: _import('bihuasuan/ad/middleAd/index'),
          name: 'b-middleAd',
          meta: {
            title: '中部广告位',
            buttons: {
              add: { label: '新建', enabled: true },
              edit: { label: '编辑', enabled: true }
            }
          }
        },
        {
          path: 'middleAdAdd',
          component: _import('bihuasuan/ad/middleAd/edit'),
          name: 'b-middleAdAdd',
          meta: { title: '中部广告位新增模板', noCache: true },
          hidden: true
        },
        {
          path: 'middleAdEdit',
          name: 'b-middleAdEdit',
          component: _import('bihuasuan/ad/middleAd/edit'),
          meta: { title: '中部广告位模板编辑', noCache: true },
          hidden: true,
          props: true
        },
      ]
    },
    {
      path: "bihuasuan/bind",
      component: _import("bihuasuan/bind/manage"),
      name: "b-bind",
      meta: {
        title: "绑定管理",
        buttons: {
          unbind: { label: '解绑', enabled: true }
        }
      }
    },
    {
      path: 'bihuasuan-zerobuy',
      component: _import('bihuasuan/zerobuy/manage'),
      name: 'b-zerobuy',
      meta: { title: '38礼包0元购' }
    },
    {
      path: 'bihuasuan-super',
      component: _import('bihuasuan/super/index'),
      name: 'b-super',
      meta: {
        title: '超级爆品',
        buttons: {
          add: { label: '新建', enabled: true },
          edit: { label: '编辑', enabled: true },
          operate: { label: '开启/关闭', enabled: true },
          manage: { label: '商品管理', enabled: true }
        }
      }
    },
    {
      path: 'superManage/:id',
      component: _import('bihuasuan/super/manage'),
      name: 'b-superManage',
      meta: {
        title: '管理爆款商品'
      },
      hidden: true,
      props: true
    },
    {
      path: 'bihuasuan-xbk',
      component: _import('bihuasuan/xbk/manage'),
      name: 'b-xbk',
      meta: { title: '选品库商品管理' }
    },
    {
      path: 'bihuasuan-keyword',
      component: _import('bihuasuan/keyword/manage'),
      name: 'b-keyword',
      meta: { title: '搜索关键词屏蔽' }
    },
    {
      path: 'bihuasuan-fullcoupon',
      component: _import('bihuasuan/fullcoupon/manage'),
      name: 'b-fullcoupon',
      meta: { title: '碧划算满额送券' }
    },
    {
      path: 'bihuasuan-cashback',
      component: _import('bihuasuan/cashback/manage'),
      name: 'b-cashback',
      meta: { 
        title: '高佣返现管理',
        buttons: {
          add: { label: '新建', enabled: true },
          edit: { label: '编辑', enabled: true }
        }
      }
    }
  ]
}
